package com.demo.principle.singleResponsibility;

public class SingleResponsibility2 {

    public static void main(String[] args) {
        RoadVehicle roadVehicle = new RoadVehicle();
        roadVehicle.run("Bicycle");
        AirVehicle airVehicle = new AirVehicle();
        airVehicle.run("Airplane");
        WaterVehicle waterVehicle = new WaterVehicle();
        waterVehicle.run("ship");
    }
}

class RoadVehicle {
    public void run(String vehicle) {
        System.out.println(vehicle + " Road RUNNING");
    }
}

class AirVehicle {
    public void run(String vehicle) {
        System.out.println(vehicle + " Air RUNNING");
    }
}

class WaterVehicle {
    public void run(String vehicle) {
        System.out.println(vehicle + " Water RUNNING");
    }
}
